package top.iridescent.test;

import java.util.ArrayList;

/**
 * Created by gukf on 2014-5-13.
 */
public class Var {
    private String varName;
    private ArrayList<String> varValue = new ArrayList<String>();

    public Var(String varName, String varValue) {
        this.varName = varName;
        this.varValue.add(varValue);
    }

    public Var(String varName, ArrayList<String> varValue) {
        this.varName = varName;
        this.varValue = varValue;
    }

    public String getVarName() {
        return varName;
    }

    public void setVarName(String varName) {
        this.varName = varName;
    }

    public String getVarValue() {
        return varValue.get(0);
    }

    public ArrayList<String> getAllVarValue() {
        return varValue;
    }

    public void addVarValue(String varValue) {
        this.varValue.add(varValue);
    }

    public void setVarValue(String varValue) {
        this.varValue.clear();
        this.varValue.add(varValue);
    }

    @Override
    public String toString() {
        return "Var{" +
                "varName='" + varName + '\'' +
                ", varValue='" + varValue.toString() + '\'' +
                '}';
    }
}
